import { PageModalService } from 'src/app/shared/service/page-modal-service';
import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-video',
  templateUrl: './video.component.html',
  styleUrls: ['./video.component.scss'],
})
export class VideoComponent implements OnInit {

  @Input() tagData: any;
  videoUr: any;
  constructor(
    private  pageModalService: PageModalService
  ) { }

  ngOnInit() {
    console.log('video数据>>>>>>>>>>>>>>>>\n', this.tagData);
    this.videoUr = this.tagData.data[0].videoUrl;
  }

  openPage(link) {
    this.pageModalService.openPage(link);
  }
}

// {
//   "type": "tag",
//   "style": "playVideo",
//   "name": "playVideo",
//   "linearLayout": "body",
//   "data": [
//       {
//           "cssStyle": "***",
//           "videoUrl": "https:///",
//           "titleCssStyle": "***",
//           "title": "视频"
//       }
//   ]
// }